package com.lsh.streamgd.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 配置文件项
 *
 * @author ljgsonx
 * @date 2017/4/22 23:16
 */
@Component
public class Settings {

    public static String webappRoot;
    public static String graphDriver;
    public static String graphHost;
    public static String graphUsername;
    public static String graphPassword;
    public static String graphDomain;
    public static int graphBlockSize;
    public static int graphThreadNum;
    public static String graphPath;

    @Value("${webapp.root}")
    public void setWebappRoot(String webappRoot) {
        Settings.webappRoot = webappRoot;
    }
    @Value("${graph.driver}")
    public void setGraphDriver(String graphDriver) {
        Settings.graphDriver = graphDriver;
    }
    @Value("${graph.host}")
    public void setGraphHost(String graphHost) {
        Settings.graphHost = graphHost;
    }
    @Value("${graph.username}")
    public void setGraphUsername(String graphUsername) {
        Settings.graphUsername = graphUsername;
    }
    @Value("${graph.password}")
    public void setGraphPassword(String graphPassword) {
        Settings.graphPassword = graphPassword;
    }
    @Value("${graph.domain}")
    public void setGraphDomain(String graphDomain) {
        Settings.graphDomain = graphDomain;
    }
    @Value("${graph.blockSize}")
    public void setGraphBlockSize(int graphBlockSize) {
        Settings.graphBlockSize = graphBlockSize;
    }
    @Value("${graph.threadNum}")
    public void setGraphThreadNum(int graphThreadNum) {
        Settings.graphThreadNum = graphThreadNum;
    }
    @Value("${graph.path}")
    public void setGraphPath(String graphPath) {
        Settings.graphPath = graphPath;
    }
}
